<?php include 'product_list_css_js.php'; ?>

<center>
    <div class="div_content_all">
        <?php include dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'cache_html' . DIRECTORY_SEPARATOR . 'top_menu.php'; ?>
        <div class="clear">
        </div>
        <div id="breadcrumb">
            <div class="clear">

            </div>
        </div>

        <div id="content">
            <div id="left-col">
                <div id="bycategory">
                    <div class="borleft">
                        <!--                        <div class="bortop png"></div>-->
                        <div class="borright">
                            <div class="content">
                                <?php if ($hasChildCategory == 0) {
                                ?>
                                    <div class="search">
                                        <form name="frmSearchProduct" id="frmSearchProduct" action="" method="post" onsubmit="MyController.searchProduct();return false;">
                                            Tên sẩn phẩm:<input type="text" class="search_input_keyword" name="product_keyword" id="product_keyword" autocomplete="off">
                                            <select name="product_maker" id="product_maker" class="search_option">
                                                <option value="0">Tất cả các hãng</option>
                                            <?php foreach ($aryProductMaker as $key => $value) {
 ?>
                                                <option value="<?php echo $value['product_maker_id']; ?>" <?php echo ($value['product_maker_name_filter'] == $makerName) ? 'selected' : ''; ?>><?php echo $value['product_maker_name']; ?></option>
<?php } ?>
                                        </select>
                                        Giá từ
                                        <input type="text" class="search_input_price" id="product_price_from" name="product_price_from" value="<?php echo $priceFrom; ?>">
                                        Đến
                                        <input type="text" class="search_input_price" id="product_price_to" name="product_price_to" value="<?php echo $priceTo; ?>">
                                        <input type="hidden" name="product_category_id" id="product_category_id" value="<?php echo $categoryId; ?>">
                                        <input type="submit" class="btnsearch" value="" onclick="MyController.searchProduct();">
                                    </form>
                                </div>
<?php } ?>

                                        <div class="productlist">
                                            <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                <tr>
                                                    <td>
                                                <?php if ($hasChildCategory == 1) {
                                                ?>
                                                <?php include 'product_list_category.php'; ?>
<?php } ?>
                                                <div id="search_result">
<?php include 'product_list_product_content.php'; ?>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="borbottom png">

                    </div>
                </div>
            </div>
            <div id="right-col">
                <?php include 'product_right_item_top.php'; ?>
                <?php include 'product_right_support.php'; ?>
<?php include 'product_right_item_top_2.php'; ?>
                                                <div class="clear"></div>

                <?php if ($hasChildCategory == 1) { ?>

                <?php include 'product_right_item_top_3.php'; ?>

                <?php } else {
 ?>
                                                    <div class="box_news_safeoff_b">
                                                        <ul class="list_p_filter_r">
                                                            <li>
                                                                <div class="link_filter_top" href="#">Thương hiệu</div>
<?php include 'product_list_product_maker.php'; ?>
                                                </li>
                                                <li>
                                                    <div class="link_filter_top" href="#">Tìm theo giá</div>
<?php include 'product_list_filter_price.php'; ?>
                                                </li>
                                                <li>
                                                    <div class="link_filter_top" href="#">Tìm theo thông số</div>
<?php include 'product_list_filter_specs.php'; ?>
                                                </li>

                                            </ul>
                                        </div>
<?php } ?>
                                                <div class="clear"></div>
<?php include 'product_right_item_top_3.php'; ?>
                                            </div>
                                        </div>
                                    </div>

                                </center>
                                <div class="clear"></div>
<?php include 'home_footer.php'; ?>
<?php include 'product_list_js.php'; ?>
<script type="text/javascript" charset="utf-8">
    var isScroll = 0;
    $(function() {
        $(".divvalign2 img").lazyload({
            effect : "fadeIn"
        });
        $(".div_item_image img").lazyload({
            effect : "fadeIn"
        });
        tooltipProduct();
    });

</script>
<script type="text/javascript">
    <?php if($listType == 2) {?>
    window.onscroll = function(e){
        if(isScroll == 0){
            loadImageTooltip();
            isScroll = 1;
        }
    };
    window.onload = function (e) {
        loadImageTooltip();
    };
    <?php } ?>
</script>
